home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 031a / blx11.zip / TTIME.CPP < prev    next >
Text File  |  1991-01-21  |  291b  |  14 lines

  1. #include<time.h>
  2. #include<iostream.h>
  3. struct tm *time(void);
  4. void main(void) {
  5.     time_t ttime = time(NULL);
  6.     struct tm *ltime = time();
  7.     cout << ctime(&ttime);
  8.     cout << asctime(ltime);
  9. }
  10. struct tm *time(void) {
  11.     time_t t = time(NULL);
  12.     return localtime(&t);
  13. }
  14.